<?php
/**
 * 首页推荐主题
 */
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTopicsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('topics', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('merchant_id')->default(0)->comment('[v1.0]店铺id, 0为公共广告位。');
            $table->integer('style')->default(0)->comment('[v1.0]推荐的显示方式。1: 轮播图；2：三列；');
            $table->string('title')->comment('[v1.0]推荐主题名称');
            $table->string('type')->comment('[v1.0]推荐的类别 1：商品分类 2：商品');
            $table->integer('order')->default(0)->comment('[v1.0]该分类在页面显示的顺序，数字越大顺序越靠后。');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('topics');
    }
}
